-
Notifications
You must be signed in to change notification settings - Fork 892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more detail error messages when installing with some components has failed. #1595
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Over-all the concept is probably good, though I worry about directing people to the rust-toolstate page directly.
I wonder if we should consider different messages depending on the channel selected. If this is nightly, the message you suggest would be suitable, but if this is stable or beta, that suggests something less good going on which might benefit from a different kind of message.
src/rustup-dist/src/errors.rs
Outdated
let _ = write!( | ||
buf, | ||
"some components unavailable for download: {}\n\ | ||
if you want these components, please install and use latest successful build version, \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're missing a 'the' between 'use' and 'latest'
src/rustup-dist/src/errors.rs
Outdated
buf, | ||
"some components unavailable for download: {}\n\ | ||
if you want these components, please install and use latest successful build version, \ | ||
which you can find out at https://rust-lang-nursery.github.io/rust-toolstate, like this.\n\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd drop the 'out' replace the ',' with '.' and change 'like this.' to '\nTo do this, run something like:\n'
src/rustup-dist/src/errors.rs
Outdated
which you can find out at https://rust-lang-nursery.github.io/rust-toolstate, like this.\n\ | ||
rustup install nightly-2018-12-27", | ||
cs_str | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comments apply here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you pull the message out into a const please
tests/cli-misc.rs
Outdated
"some components unavailable for download: 'rustc', 'cargo'\n\ | ||
if you want these components, please install and use latest successful build version, \ | ||
which you can find out at https://rust-lang-nursery.github.io/rust-toolstate, like this.\n\ | ||
rustup install nightly-2018-12-27", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comments apply here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm with the requested changes
src/rustup-dist/src/errors.rs
Outdated
let _ = write!( | ||
buf, | ||
"some components unavailable for download: {}\n\ | ||
if you want these components, please install and use latest successful build version, \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you want these components, please install and use latest successful build version, \ | |
if you require these components, please install and use the latest successful build, \ |
src/rustup-dist/src/errors.rs
Outdated
buf, | ||
"some components unavailable for download: {}\n\ | ||
if you want these components, please install and use latest successful build version, \ | ||
which you can find out at https://rust-lang-nursery.github.io/rust-toolstate, like this.\n\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which you can find out at https://rust-lang-nursery.github.io/rust-toolstate, like this.\n\ | |
which you can find at https://rust-lang-nursery.github.io/rust-toolstate, for example.\n\ |
src/rustup-dist/src/errors.rs
Outdated
which you can find out at https://rust-lang-nursery.github.io/rust-toolstate, like this.\n\ | ||
rustup install nightly-2018-12-27", | ||
cs_str | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you pull the message out into a const please
I was thinking you would use something like |
@nrc I see, thanks! |
@nrc Fixed and passed CI |
Thanks! |
Error message that we get when installing with some components failed may seem unkind for beginners.
Many users create issue at component's repository.
For example,
rust-lang/rls#1186
rust-lang/rls#641
rust-lang/rustfmt#3244
rust-lang/rust-clippy#2869
So I might want to add more information.
(But there may be more suitable message.)